.TH @CDPARANOIA_NAME@ 1 "version III release alpha 9.8 libcdio"
.SH NAME
@CDPARANOIA_NAME@ 9.8 (Paranoia release III via libcdio) \- an audio CD reading utility which includes extra data verification features
.SH SYNOPSIS
.B @CDPARANOIA_NAME@
.RB [ options ]
.B span
.RB [ outfile ]
.SH DESCRIPTION
.B @CDPARANOIA_NAME@
retrieves audio tracks from CDDA capable CD-ROM drives.  The data can
be saved to a file or directed to standard output in WAV, AIFF, AIFF-C
or raw format.  Most ATAPI, SCSI and several proprietary CD-ROM drive
makes are supported;
.B @CDPARANOIA_NAME@
can determine if the target drive is CDDA capable.
.P
In addition to simple reading,
.B @CDPARANOIA_NAME@
adds extra-robust data verification, synchronization, error handling
and scratch reconstruction capability.
.P
This version uses the libcdio library for interaction with a CD-ROM
drive. The jitter and error correction however are the same as used in
Xiph's cdparanoia.
.SH OPTIONS

.TP
.B \-A --analyze-drive
Run and log a complete analysis of drive caching, timing and reading behavior;
verifies that cdparanoia is correctly modelling a specific drive's cache and
read behavior. Implies -vQL.

.TP
.B \-v --verbose
Be absurdly verbose about the autosensing and reading process. Good
for setup and debugging.

.TP
.B \-q --quiet
Do not print any progress or error information during the reading process.

.TP
.B \-e --stderr-progress
Force output of progress information to stderr (for wrapper scripts).

.TP
.B \-V --version
Print the program version and quit.

.TP
.B \-Q --query
Perform CD-ROM drive autosense, query and print the CD-ROM table of
contents, then quit.

.TP
.B \-h --help
Print a brief synopsis of
.B @CDPARANOIA_NAME@
usage and options.

.TP
.BI "\-l --log-summary " file
Save result summary to file.

.TP
.BI "\-L --log-debug " file
Save detailed device autosense and debugging output to a file.

.TP
.B \-p --output-raw
Output headerless data as raw 16 bit PCM data with interleaved samples in host byte order.  To force little or big endian byte order, use
.B \-r
or
.B \-R
as described below.

.TP
.B \-r --output-raw-little-endian
Output headerless data as raw 16 bit PCM data with interleaved samples in LSB first byte order.

.TP
.B \-R --output-raw-big-endian
Output headerless data as raw 16 bit PCM data with interleaved samples in MSB first byte order.

.TP
.B \-w --output-wav
Output data in Microsoft RIFF WAV format (note that WAV data is always
LSB first byte order).

.TP
.B \-f --output-aiff
Output data in Apple AIFF format (note that AIFC data is
always in MSB first byte order).

.TP
.B \-a --output-aifc
Output data in uncompressed Apple AIFF-C format (note that AIFF-C data is
always in MSB first byte order).

.TP
.BI "\-B --batch "

Cdda2wav-style batch output flag; @CDPARANOIA_NAME@ will split the output
into multiple files at track boundaries.  Output file names are
prepended with 'track#.'

.TP
.B \-c --force-cdrom-little-endian
Some CD-ROM drives misreport their endianness (or do not report it at
all); it's possible that @CDPARANOIA_NAME@ will guess wrong.  Use
.B \-c
to force @CDPARANOIA_NAME@ to treat the drive as a little endian device.

.TP
.B \-C --force-cdrom-big-endian
As above but force @CDPARANOIA_NAME@ to treat the drive as a big endian device.

.TP
.BI "\-n --force-default-sectors " n
Force the interface backend to do atomic reads of
.B n
sectors per read.  This number can be misleading; the kernel will often
split read requests into multiple atomic reads (the automated Paranoia
code is aware of this) or allow reads only wihin a restricted size
range.
.B This option should generally not be used.

.TP
.BI "\-d --force-cdrom-device " device
Force the interface backend to read from
.B device
rather than the first readable CD-ROM drive it finds containing a
CD-DA disc.  This can be used to specify devices of any valid
interface type (ATAPI, SCSI or proprietary).

.TP
.BI "\-g --force-generic-device " device
This option is an alias for
.B \-d
and is retained for compatibility.

.TP
.BI "\-S --force-read-speed " number
Use this option explicitly to set the read rate of the CD drive (where
supported).  This can reduce underruns on machines with slow disks, or
which are low on memory.

.TP
.BI "\-t --toc-offset " number
Use this option to force the entire disc LBA addressing to shift by
the given amount; the value is added to the beginning offsets in the
TOC.  This can be used to shift track boundaries for the whole disc
manually on sector granularity.  The next option does something
similar...

.TP
.BI "\-T --toc-bias "
Some drives (usually random Toshibas) report the actual track
beginning offset values in the TOC, but then treat the beginning of
track 1 index 1 as sector 0 for all read operations.  This results in
every track seeming to start too late (losing a bit of the beginning
and catching a bit of the next track).
\-T accounts for this behavior.  Note that this option will cause
@CDPARANOIA_NAME@ to attempt to read sectors before or past the known user
data area of the disc, resulting in read errors at disc edges on most
drives and possibly even hard lockups on some buggy hardware.

.TP
.BI "\-O --sample-offset " number
Some CD-ROM/CD-R drives will add an offset to the position on reading
audio data. This is usually around 500-700 audio samples (ca. 1/75
second) on reading. So when @CDPARANOIA_NAME@ queries a specific
sector, it might not receive exactly that sector, but shifted by some
amount.
.P
Use this option to force the entire disc to shift sample position
output by the given amount; This can be used to shift track boundaries
for the whole disc manually on sample granularity. Note that if you
are ripping something including the ending of the CD (e.g. the entire
disk), this option will cause @CDPARANOIA_NAME@ to attempt to read
partial sectors before or past the known user data area, probably
causing read errors on most drives and possibly even hard lockups on
some buggy hardware.

.TP
.BI \-E --force-overread
Force overreading into the lead-out portion of the disc. This option is only applicable when using the
+.B -O
+option with a positive sample offset value. Many drives are not capable of reading into this portion of the disc and attempting to do so on those drives will produce read errors and possibly hard lockups.

.TP
.B \-Z --disable-paranoia
Disable
.B all
data verification and correction features.  When using -Z, @CDPARANOIA_NAME@
reads data exactly as would cdda2wav with an overlap setting of zero.
This option implies that
.B \-Y
is active.

.TP
.B \-z --never-skip[=max_retries]
Do not accept any skips; retry forever if needed.  An optional maximum
number of retries can be specified; for comparison, default without -z is
currently 20.

.TP
.B \-Y --disable-extra-paranoia
Disables intra-read data verification; only overlap checking at read
boundaries is performed. It can wedge if errors occur in the attempted overlap area. Not recommended.

.TP
.B \-X --abort-on-skip
If the read skips due to imperfect data, a scratch, whatever, abort reading this track.  If output is to a file, delete the partially completed file.

.TP
.B \-x --test-flags mask
Simulate CD-reading errors. This is used in regression testing, but
other uses might be to see how well a CD-ROM performs under
(simulated) CD degradation. mask specifies the artificial kinds of
errors to introduced; "or"-ing values from the selection below will
simulate the kind of specified failure.
.P
     0x10  - Simulate under-run reading
.TP


.SH OUTPUT SMILIES
.TP
.B
  :-)
Normal operation, low/no jitter
.TP
.B
  :-|
Normal operation, considerable jitter
.TP
.B
  :-/
Read drift
.TP
.B
  :-P
Unreported loss of streaming in atomic read operation
.TP
.B
  8-|
Finding read problems at same point during reread; hard to correct
.TP
.B
  :-0
SCSI/ATAPI transport error
.TP
.B
  :-(
Scratch detected
.TP
.B
  ;-(
Gave up trying to perform a correction
.TP
.B
  8-X
Aborted read due to known, uncorrectable error
.TP
.B
  :^D
Finished extracting

.SH PROGRESS BAR SYMBOLS
.TP
.B
<space>
No corrections needed
.TP
.B
   -
Jitter correction required
.TP
.B
   +
Unreported loss of streaming/other error in read
.TP
.B
   !
Errors found after stage 1 correction; the drive is making the
same error through multiple re-reads, and @CDPARANOIA_NAME@ is having trouble
detecting them.
.TP
.B
   e
SCSI/ATAPI transport error (corrected)
.TP
.B
   V
Uncorrected error/skip

.SH SPAN ARGUMENT

The span argument specifies which track, tracks or subsections of
tracks to read.  This argument is required.
.B NOTE:
Unless the span is a simple number, it's generally a good idea to
quote the span argument to protect it from the shell.
.P
The span argument may be a simple track number or an offset/span
specification.  The syntax of an offset/span takes the rough form:
.P
1[ww:xx:yy.zz]-2[aa:bb:cc.dd]
.P
Here, 1 and 2 are track numbers; the numbers in brackets provide a
finer grained offset within a particular track. [aa:bb:cc.dd] is in
hours/minutes/seconds/sectors format. Zero fields need not be
specified: [::20], [:20], [20], [20.], etc, would be interpreted as
twenty seconds, [10:] would be ten minutes, [.30] would be thirty
sectors (75 sectors per second).
.P
When only a single offset is supplied, it is interpreted as a starting
offset and ripping will continue to the end of the track.  If a single
offset is preceeded or followed by a hyphen, the implicit missing
offset is taken to be the start or end of the disc, respectively. Thus:

.TP
.B  1:[20.35]
Specifies ripping from track 1, second 20, sector 35 to the end of
track 1.
.TP
.B 1:[20.35]-
Specifies ripping from 1[20.35] to the end of the disc
.TP
.B \-2
Specifies ripping from the beginning of the disc up to (and including) track 2
.TP
.B \-2:[30.35]
Specifies ripping from the beginning of the disc up to 2:[30.35]
.TP
.B 2-4
Specifies ripping from the beginning of track 2 to the end of track 4.
.P
Again, don't forget to protect square brackets and preceeding hyphens from
the shell.

.SH EXAMPLES

A few examples, protected from the shell:
.TP
Query only with exhaustive search for a drive and full reporting of autosense:
.P
       @CDPARANOIA_NAME@ -vsQ
.TP
Extract an entire disc, putting each track in a separate file:
.P
       @CDPARANOIA_NAME@ -B
.TP
Extract from track 1, time 0:30.12 to 1:10.00:
.P
       @CDPARANOIA_NAME@ "1[:30.12]-1[1:10]"
.TP
Extract from the beginning of the disc up to track 3:
.P
       @CDPARANOIA_NAME@ -- "-3"
.TP
The "--" above is to distinguish "-3" from an option flag.
.SH OUTPUT

The output file argument is optional; if it is not specified,
@CDPARANOIA_NAME@ will output samples to one of
.BR cdda.wav ", " cdda.aifc ", or " cdda.raw
depending on whether
.BR \-w ", " \-a ", " \-r " or " \-R " is used (" \-w
is the implicit default).  The output file argument of
.B \-
specifies standard output; all data formats may be piped.

.SH ACKNOWLEDGEMENTS
@CDPARANOIA_NAME@ sprang from and once drew heavily from the interface of
Heiko Eissfeldt's (heiko@colossus.escape.de) 'cdda2wav'
package. @CDPARANOIA_NAME@ would not have happened without it.
.P
Joerg Schilling has also contributed SCSI expertise through his
generic SCSI transport library.
.P
.SH AUTHOR
Monty <monty@xiph.org>
.P
Cdparanoia's homepage may be found at:
https://www.xiph.org/paranoia/
.P
Revised for use with libcdio by Rocky <rocky@gnu.org>
.P
The libcdio homepage may be found at:
https://www.gnu.org/software/libcdio/
